home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Collections: Taifun
/
Taifun 066 (1988-08-15)(Ossowski, Stefan)(DE)(PD).zip
/
Taifun 066 (1988-08-15)(Ossowski, Stefan)(DE)(PD).adf
/
SpriteMasterII
/
SpriteMasterII.DOC
< prev
next >
Wrap
Text File
|
1988-06-02
|
18KB
|
334 lines
Instructions for SPRITEMASTER II by Brad Kiefer
(C) 1987 by Brad Kiefer
512 D Kingsway Ave. S.E.
Medicine Hat, Alberta
T1A 2W7
(403) 526-2288 Work
(403) 527-7871 Home
This Program is released to the Public Domain on 2 conditions:
1. That this Instruction.doc be distributed with it, and . .
2. That the above copyright notice be left intact.
If you find the program useful the author would appreciate a small
pittance of $10.00 . Now onto the useful stuff.
Sprites Can be ANY length ( up to 200 pixels tall ) but only 16 pixels
wide, unfortunately. Refer to you Rom Kernal Manuals on all the details.
However, there are ways around these limitations. By Attaching two sprites
together we boost the number of colors we can effectively use from 4 to 16.
By placing 2 or more sprites side by side we can double or triple or
quadruple the width of the sprite too ! With so many Sprites at our
disposal, why not ??
So, now that we have decided to use Sprites, lets see how SPRITEMASTER
II can help.
The first thing you are greeted with is the opening options screen. The
top string gadget is how many Sprites you want in each buffer; anything up
to a maximum of 99 is accepted ( With a word of warning : Since only a word
size is used you must keep the maximum buffer length under 65K. e.g.: Sprite
Height*4+8*Number of Sprites per Buffer < 65,000 . You can see that with 99
200 pixel sprites the formula yields the following results: 200*4+8*99=79,
992 bytes. MORE than 1 word can hold !! So, if using 200 pixel sprites try
to keep the number of sprites per buffer down to around 80 or so. You can
always add more Buffers on instead. ) The next string gadget is for how high
you want each sprite to be. Anything up to the maximum of 200 pixels is
allowed. Then, how many Buffers do you want. A normal application of :
Number of Sprites Per Buffer : 50
Height of Sprites : 15
Number of Buffers : 5
would yield a total of 2.06K Chip memory being allocated and 250 sprites to
work on at one time. ( only sprites in the first buffer may be animated
though ).
If you are going to be using one particular set of parameters it would
probably be wise to save the setting as a configuration.file that
SPRITEMASTER II reads in when you hit the Config gadget instead of the 'Try
It' gadget. Merely click in the string gadget with the 'n' in it and type
'y'. Then when you click on 'Try it', the program will save the new
configuration.file under the SPRITEMASTER/Sprite drawer. Next time you run
the program merely hit the Config gadget and your configuration will be
loaded in and activated !!
The Opening screens shows the sprite expanded in a grid on the left
side of the screen. This is your work area. If you chose a number under 23
pixels for your Sprites, then an Extra line will be drawn on the grid
showing how far down you are allowed to draw. The drawing area under this
area is off limits. Clicking the mouse inside the drawing area will leave a
trail of colored squares behind, just like any other drawing program. You
can keep the left button down and draw for faster operation. Notice the
difference compared to other Sprite Programs written in C ? I even had to
install a delay to keep up.
On the right hand side of the grid is a set of 4 arrows. If you have
picked a pixel length greater than 23 pixels, there is no way to modify the
sprite all at one time, so you must scroll the sprite up and down to reach
all of its length. The left and right scroll bars are included to scroll the
sprite left and right within the Grid without cropping.
Over more and up are the Sprite Numbers and the color selection boxes.
If sprite #1 is currently selected you can draw with any of the first 4
colors in Box #1. If sprite #2 or Sprite #3 is selected the next 4 colors
are active, and so on. Simply click on the desired color you want and the
big Current Color indicator will reflect your choice. Now you can draw with
that color in the Grid. No matter WHAT color you put in Color 0 on each
sprite it will NEVER appear on the sprite. Color 0 is Transparent and as
such is a color, but a see-through color. All the color 0's for each sprite
are set to Black as default so as not to confuse, but should you change
these to some other colors, they will still act as Transparent to the
Sprites ! Sorry, Talk to Commodore-Amiga.
To Choose a Sprite just click ABOVE the color selection Boxes on any of
the 7 Numbers there and Current Sprite Number at the bottom right hand side
of the screen will show that sprite as being the current sprite. Also, that
sprite will be drawn in the Grid Box on the left of the screen and Color #1
will be the active color !
The Boolean Gadget with the A on it is the Animate Gadget, used for
animating your sprites. See Animate
Well, lets move onto the menus !
Main Menus
HELP: Commands, Sprites, Show Bar, Hide Bar, RESET, OPTIONS
PROJECT: Archive, Load Palette, Save Palette, Say Goodbye !
MOVE: Up 1 Page, Down 1 Page, Up 10 Pages, Down 10 Pages
FUN: Mirror Image, Reverse 0 & 3, Reverse 1 & 2, Reverse
Entire Sprite, Flip Sprite, Move Sprite #, Animate
THINGS: Palette, Transfer, Clear, Fill, Grid, Take Pic, Plant Pic.
SPRITE: Attach Sprites ( Not Implemented ),Hide Sprites, Show
Sprit es.
Lets Take Them 1 at a time and go through them
HELP:
1. Commands: This merely displays a requester on copyright notice and
such.
2. Sprites : This displays a requester and cautions you about being
careful loading and saving different lengths of sprites. More on this later.
3. Show Bar: This will display the title bar if is not already
displayed.
4. Hide Bar: What else.
5. RESET: This will entirely reset the machine without having to
rerun the program. Careful, All your sprites will be lost !!
6. OPTIONS: This will take you back to the opening Options screen and
allow you to reset the Height of your sprites etc. Not quite as catastrophic
as RESET.
PROJECT:
1. Archive: This will bring up the Load/Save Window. The opening,
default text for Drive and path is DF0:, and the program will display all
files on that drive. Files will be blue, Directories will be in Gray. To
access a directory, merely click the mouse button on any of the Gray names
and the subsequent Directory will be displayed. Once you have the Filename
you wish to do something with on the screen, click on it and it will appear
in the Filename String Gadget. If you hit delete, the file will be DELETED
with no requester of any kind saying " Are you sure you want to DELETE file
so and so ?? ", so be sure before you hit it. Makedir does not work right
now but will be implemented when I am not so lazy. There were minor bugs in
it, and rather that put it in untested I left it out. Hitting on either of
the DF0: and DF1: gadgets will take you to that particular drive. Hitting
the load gadget will open the Load Window. Use the left mouse button to
increment the Buffer counter and Page counter for where you want the file to
load in at. Try and keep it down far enough in the allocated memory so it
does not corrupt memory past the amount specified in the opening options
screen. This will happen when, for instance, you have specified 2 buffers of
44 pages, and then try to load a 10k file in at buffer #2 Page #40 !!! Oh,
sure you will get the first couple of pages, but the rest of the file will
end up who knows where. To check all this would have required too much
trouble, so I rest the burden of this on your shoulders ! To load the file
only the top row of numbers are in operation. When Saving a file you can
specify both the Buffer and Page to load from and the Buffer and Page to
save to ! Thus to save sprites Buffer #1 Page #20 to Buffer #2 Page #12 you
would click on the (10) Page # until it read Page #20 ( requires two clicks
) then move down to the Save portion of the window and click inside the
Buffer # once to move it to Buffer #2 then once in the (10) Page # and twice
in the (1) Page #. Then select OK and your sprites will be saved as a binary
file. For a 15 pixel long sprite 68 bytes are saved for every sprite
specified. Sprites are saved inclusive of the last Page specified. Thus, in
the preceding example, Buffer #2 Page #21 sprite would be saved too ! Each
Sprite is saved in the following format:
FFFF FFFF ;2 words for control and position
8000 7000 ;2 words for every pixel in height
CC00 FF00 ;etc., etc.
0000 0000 ;2 ending words consisting of the next
;usage of this sprite Usually Zero
Therefor 15 pixels * 4 bytes per pixel = 60 bytes. 2 control words at
the beginning of the sprite and at the end of the sprite = 8 bytes for a
total of 68 bytes per sprite !
Once a drive and path have been selected, the next time Archive is
selected the program will remain in that Drive/Path. Of course you can
always click in the string gadgets and enter it by hand if you want to. (
Why buy an Amiga he asks ?? )
2. Load Palette : This brings up a Requester with a 9 images on it ;
the number of Palettes you are allowed to use. Merely click on the number of
the Palette you wish to load in, and the that ColorMap will be used from
that time on, providing you had saved a Palette already under the Palette
directory. 3 or 4 Palette's are provided as examples.
3. Save Palette : Once you are done modifying the colors you wish for
your sprite and wish to save them rather than trying to get the exact color
combinations again, just pick Save Palette and then the number you wish to
save and the ColorMap will be saved ( 32 color words or 64 bytes long ). If
for instance you picked number 3, the color information would be saved under
the following drive/path SPRITEMASTERII/Palette/Palette3.pal.
**** NOTE : If you are not running from Workbench be sure to CD:
SPRITEMASTER or you will probably run into a lot of trouble !! ****
4. Say Goodbye ! : Exit the program ( what, are you kidding ? )
MOVE:
1. Up 1 Page : Move all 7 sprites down by 1. NOTE : ANY of the move
instructions do not affect the sprite currently displayed in the grid box on
the left of the screen. Due to EXTREMELY slow times involved in my
DrawSprite routine ( and I used every trick in 68000 Assembly to get it up
the speed it is at ), I think because _LVORectFill is so slow, I do not
redraw the sprite everytime you move up and down through the buffers. Merely
click on the sprite number you wish to modify and the sprite will be drawn
on the grid. Then go to it. If you keep the same parameters as default and
you move up until you can go no further you will find you stop at page #38
and the screen Beeps. That is because you are at the end of the buffer.
Since 44 sprites were specified if Sprite #1 is at page 38 then Sprite #7 is
at page 44. Just click on #7 and you can modify sprite 44.
2. Down 1 Page : Same as above, of course. Except that you cannot go
down under Buffer #1 Page #00 !!
3. Up 10 Pages : Just a fast way to get around. Depending on the Page
number when you start you may find the screen Beeping when you are far from
the end of the Buffer. This is because to add 10 pages would take you over
the top ! Just move Up 1 Page to reach the final page number.
4. Down 10 Pages : I've had this thing throw some oddball characters up
there at times but can't seem to get it to do it consistently. Any troubles,
let me know.
**** NOTE : Start the prog. form CLI and run through the pages, then move
to Workbench and run the program; then run through the pages again 1 at a
time ( Simply hold the Right Amiga and 1 keys down ). What a difference !!
FUN:
1. Mirror Image : This will create a mirror image of the currently
selected sprite from right to left. If the man was facing left he's facing
right NOW.
2. Reverse 0 & 3 : Reverses colors 0 & 3. I don't know you might find
these colors useful if you ever find you drew a great big complicated sprite
and decide everything you drew in a certain color would look better in a
different one ?? I don't know.
3. Reverse 1 & 2 : Reverses color 1 & 2. Same as above but now you have
even more versatility.
4. Reverse Entire Sprite : Wow, is this guy stuck on Reversi or what ??
5. Flip Sprite : Flip the current sprite upside down, or right side up
if you drew it upside down !
6. Move Sprite : Brings up a requester asking you to input the Sprite #
you wish to move and the X,Y coordinates to move it to. This is useful for
moving your sprites about the screen and sticking them together before you
animate them. Clicking OK will move the sprite there, Cancel will cancel
this requester without doing anything and clicking Joy will move the
selected sprite by a joystick plugged into port #2; the one at the back of
the machine. Push the fire button when it is properly positioned to take you
back to the program. Should be able to control the delay in movement of the
sprite. Some might think the speed I set is too slow or too fast.
7. Animate : Ahah !, now we get to the crux of the matter. I had to cut
this short due to the pressing of other matters. Hopefully you will hear all
about it later. A requester will appear with numbers from 1 to 7 down the
left side. ANY SPRITES BEING ANIMATED MUST BE IN BUFFER #1. Put the starting
and ending pages of the sprites you want animated in the respective string
gadgets and hit OK.
** You must specify a sprite #1 to be animated regardless of any of
the other sprites that are being animated. **
I take the starting and ending pages off of Sprite #1 and use them
for all the other sprites too. That means that each animation sequence must
have the same number of cel's in it. ( That's animation talk ) On the sample
sprites provided ( Sprites/Sprites1.spr ) try this input: Starting Page #7
Ending Page #11 then OK. Now move down to the Boolean gadget at the bottom
of the screen with the Large A on the top of it and click the left mouse
button. The Hearts should start beating. The only thing you should play with
while the animation is running is the 4 scroll gadgets that are used to move
the sprite around the grid. They work in the following manner :
sub 50 from Delay time FASTER
^
Subtract 200 from Delay FAST < > Adds 200 to Delay time SLOW
V
Add 50 to Delay time Slower
When you are done watching the animation just click the Boolean gadget
to off and resume modifying your sprites. When you use Move Sprite you must
activate the Animate Requester and hit OK even if you don't want to change
anything. When you hit OK, the memory is allocated for the animation and the
sprites are moved up to the new chip memory where they reside for the ani.
sequences. If you do not do this, the sprite will be flung back to its old
position and animated from there ! Hit Right Amiga A and put 7 & 11 for all
seven sprites and watch all 7 sprites animate !
Should put the joystick on this routine so you can move a sprite around
while it is being animated. Any call for this ?? Just let me know.
THINGS:
1. Palette : This will bring up the palette window ; move it to where
it is most convenient. There's the familiar RGB Prop Gadgets !
Everything is pretty self-explanatory here. If you want to accept the
changes made hit OK, if not hit cancel. Hit undo to UNDO the changes so far.
Spread will give you a spread between 2 color ( Give me a break, I know it
doesn't work very well, I missed something on my averaging algorithm. Who
needs to spread colors on a Sprite Program anyway, geesh ! ) and EX will
exchange any 2 colors. Don't forget to Save Palette if you want to keep you
colors and load them back in next time or use them in your own program.
2. Transfer : Transfer a range of sprites to any Buffer and Page
3. Clear : Clear out a range of sprites ( makes them Zero )
4. Fill : Fill a range of sprites ( makes them Solid )
5. Grid : Puts a grid on the Grid for fine detail work. Toggles on
off everytime it is selected.
6. Take Pic : Takes a snapshot of the current sprite in a Extra Buffer
area for safekeeping. If you modify the sprite and find you don't like it
you can move to the next command and bring your sprite BACK !
7. Plant Pic : Plant the Sprite in the Extra Buffer area at the
currently selected Page. Good for moving 1 page up a couple quick without
having to go to transfer everytime !
Sprite:
1. Attach Sprites : Sorry, Not implemented, But I AM working on it.
Real Soon Now .
2. Hide All Sprites : Since sprites are independent of Windows and
Screens they always stay where they are. This can be irritating to downright
maddening when you are moving screens around willy-nilly. Activate this and
it will hide the sprites so you can perform some other function without the
sprites interfering with you.
3. Show All Sprites : This will bring the sprites back once you are
done doing whatever it was that you were doing !!
Well, I think that about covers everything. I am REALLY rushed these
days so I don't have time to make this LOOK really good, but let me know
what you think and any ideas for improvement or BUG ( what a nasty word,
where's the RAID ) fixes etc., would be appreciated. Also, If you use the
program at all I would appreciate a meager donation ; after all that's what
its all about right ?
Brad Kiefer
512 d Kingsway Ave. S.E.
Medicine Hat, Alta WORK
T1A 2W7
(403) 526-2288
524 c Princess Ave. S.E.
Medicine Hat, ALberta HOME
T1A 3C4
(403) 527-7871